import {createRouter,createWebHistory} from 'vue-router'
//导入组件
import LoginVue from "@/views/UserLogin.vue";
import LayoutVue from "@/views/Layout.vue";
import initiateA from "@/views/common/InitiateApproval.vue"
import underwayA from "@/views/common/UnderwayApproval.vue"
import historyA from "@/views/common/HistoryApproval.vue"
import approvalM from "@/views/enterprise/ApprovalManage.vue"
import approvalD from "@/views/enterprise/ApprovalDefinition.vue";
import enterM from "@/views/enterprise/EnterpriseManage.vue"
import userM from "@/views/enterprise/UserManage.vue"
import clientM from "@/views/system/ClientManage.vue"
import sysLogin from "@/views/system/SysLogin.vue"

//定义路由关系
const routes=[
    {path:"/login",component:LoginVue},
    {path:"/sysLogin",component:sysLogin,},
    {path:"/layout",component:LayoutVue,
        children:[
            {path:"/layout/initiateA",component:initiateA},
            {path:"/layout/underwayA",component:underwayA},
            {path:"/layout/historyA",component:historyA},
            {path:"/layout/approvalM",component:approvalM},
            {path:"/layout/approvalD",component:approvalD},
            {path:"/layout/userM",component:enterM},
            {path:"/layout/enterM",component:userM},
            {path:"/layout/clientM",component:clientM},
        ]
    },
]

//创建路由器
const router=createRouter({
    history:createWebHistory(),
    routes:routes
})

export default router;